
use intermediate/aggregated.dta,clear

label var pre_trust "Trust"
label var pre_mobile "Mobile"
label var pre_disability "Disability"

eststo clear
eststo: reg p_5mafter pre_disability pre_mobile pre_trust i.strata [fweight = weight] ,ro cluster(s_Bag_ID)
estadd scalar ncluster = e(N_clust): est1
sum `e(depvar)' [fweight = weight] if e(sample) & pre_intervention == 5
estadd scalar mean= r(mean)

eststo: reg p_5mafter pre_disability pre_mobile pre_trust  p_1mbefore p2016_dm  i.strata [fweight = weight],ro  cluster(s_Bag_ID)
estadd scalar ncluster = e(N_clust): est2
sum `e(depvar)' [fweight = weight] if e(sample) & pre_intervention == 5
estadd scalar mean= r(mean)

eststo: reg p_5mafter pre_disability pre_mobile pre_trust  p_1mbefore p2016_dm  i.strata i.s_Soum_ID [fweight = weight],ro  cluster(s_Bag_ID)
estadd scalar ncluster = e(N_clust): est3
sum `e(depvar)' [fweight = weight] if e(sample) & pre_intervention == 5
estadd scalar mean= r(mean)

eststo: reg p_5mafter pre_disability pre_mobile pre_trust  p_1mbefore p2016_dm  i.strata i.s_Soum_ID highereduc3 [fweight = weight],ro  cluster(s_Bag_ID)
estadd scalar ncluster = e(N_clust): est4
sum `e(depvar)' [fweight = weight] if e(sample) & pre_intervention == 5
estadd scalar mean= r(mean)
eststo: reg p_5mafter pre_disability pre_mobile pre_trust  p_1mbefore p2016_dm  i.strata i.s_Soum_ID highereduc3  s4_* athome [fweight = weight],ro  cluster(s_Bag_ID)
estadd scalar ncluster = e(N_clust): est5
sum `e(depvar)' [fweight = weight] if e(sample) & pre_intervention == 5
estadd scalar mean= r(mean)
eststo: reg p_5mafter pre_disability pre_mobile pre_trust  p_1mbefore p2016_dm  i.strata i.s_Soum_ID highereduc3  s4_* athome job_* female age [fweight = weight],ro  cluster(s_Bag_ID)
estadd scalar ncluster = e(N_clust): est6
sum `e(depvar)' [fweight = weight] if e(sample) & pre_intervention == 5
estadd scalar mean= r(mean)






esttab  using "final/main_forreplication.tex", replace  se b(%5.4f) r2 label nogaps starlevels(\sym{*} 0.1 \sym{**} 0.05 \sym{***} 0.01 ) nobaselevels indicate("Strata Fixed Effects= _cons"   "Contribution One Month Before = p_1mbefore"  "Any Contribution in 2016 = *p2016_dm" "District Fixed Effects= *s_Soum_ID" "Higher Education = highereduc3*" "Treatment Month Dummies = *s4*" "Treatment at Home = athome*" "Female= *female*" "Age= age*" "Occupation Dummies= job*") 
esttab  using "final/main_forreplication_head.tex", replace  se   posthead("") collabels(none) nomtitles nocons nonumbers eqlabels("") prehead("") postfoot("") prefoot("") nonotes nogap  keep(pre_disability pre_trust pre_mobile)  stats(, labels()) starlevels(\sym{*} 0.1 \sym{**} 0.05 \sym{***} 0.01 ) label
esttab  using "final/main_forreplication_foot.tex" , replace  stats(mean, labels("Mean Outcome in the Control Group")) se  collabels(none) nonumbers nomtitles nocons  eqlabels("") prehead("") postfoot("") prefoot("") nonotes nogap keep("") posthead("") 
esttab  using "final/main_forreplication_foot.tex", append  se  collabels(none) nomtitles nocons nonumbers eqlabels("") prehead("") postfoot("") prefoot("") nonotes nogap keep("") posthead("") stats(,labels()) indicate("Strata Fixed Effects= _cons"   "Contribution One Month Before = p_1mbefore"  "Any Contribution in 2016 = *p2016_dm" "District Fixed Effects= *s_Soum_ID" "Higher Education = highereduc3*" "Treatment Month Dummies = *s4*" "Treatment at Home = athome*" "Female= *female*" "Age= age*" "Occupation Dummies= job*") 
esttab  using "final/main_forreplication_foot.tex" , append   se  collabels(none) nonumbers nomtitles nocons  eqlabels("") prehead("") postfoot("") prefoot("") nonotes nogap keep("") posthead("") stats( N ncluster,labels( "Observations" "N of Subdistricts"))


